import { VNode } from "vue";
declare type MessageType = '' | 'success' | 'warning' | 'info' | 'error';
import type {MessageBoxData} from "element-plus"

type NotificationConfig = {
    title?: string,
    message: string | VNode,
    type:'success' | 'warning' | 'info' | 'error',
    duration?: number
}
type MessageConfig={
    message:string | VNode | (()=>VNode),
    type:'success' | 'warning' | 'info' | 'error',
    duration?: number
}
export type Notification = (config: NotificationConfig) => void
export type Message = (config: MessageConfig) => void
export type MessageBox = (title:string,message:string,type?:MessageType)=>Promise<MessageBoxData> 
export type UseElementPlus = {
    notification: Notification,
    message: Message,
    messageBox: MessageBox
}